package com.lcm.oj.lanqiao.year2021.moni.c2;

/**
 * @author Coder-lcm
 * @date 2021/4/17
 */
public class T5 {
    public static void main(String[] args) {
        String str = "LANQIAO";
        int len = str.length();
        int res = 0;
        for (int i = 0; i < len; i++) {
            for (int i1 = i+1; i1 < len; i1++) {
                res += Math.abs(str.charAt(i1) - str.charAt(i));
            }
        }
        System.out.println(res);
    }
}
